Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Simplify customization of bson-kotlinx #1293

Merged
merged 2 commits into from
Jan 24, 2024
Merged

Conversation

rozza
Copy link
Member

@rozza rozza commented Jan 10, 2024

Allow configuration to be set on the KotlinSerializerCodecProvider

JAVA-5276

Allow configuration to be set on the KotlinSerializerCodecProvider

JAVA-5276
@rozza rozza requested review from a team and stIncMale and removed request for a team January 10, 2024 11:38
Copy link
Member

@stIncMale stIncMale left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is one optional suggestion, if you find it helpful.

writer.flush()

assertEquals(
BsonDocument.parse("""{"open": {"__type": "org.bson.codecs.kotlinx.samples.DataClassOpenB", "b": 1}}"""),
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[optional]
We may also test that decoding this BSON succeeds and produces an object equal to dataClassContainsOpenB. This way we'll know that the custom classDiscriminator is used not only by the encoder, but also by the decoder.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

@rozza rozza merged commit baebf90 into mongodb:master Jan 24, 2024
4 of 5 checks passed
@rozza rozza deleted the JAVA-5276 branch January 24, 2024 11:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants